package com.zeedev.flyingsaucer.beers.modules;

import com.google.inject.Provides;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import com.zeedev.flyingsaucer.beers.activities.beerdialog.BeerDialogModule;
import com.zeedev.flyingsaucer.beers.activities.login.LoginModule;
import com.zeedev.flyingsaucer.beers.activities.tabchooser.impl.MemberTabModel;
import com.zeedev.flyingsaucer.beers.activities.tabchooser.impl.StoreTabModel;
import com.zeedev.flyingsaucer.beers.activities.tabchooser.interfaces.TabModel;
import mobi.zeedev.flyingsaucer.common.CredentialsModule.interfaces.ICredentials;
import roboguice.config.AbstractAndroidModule;

public class BeerModule extends AbstractAndroidModule {

    @Override
    protected void configure() {


//        install(new StoreModule());
        install(new LoginModule());

        bind(TabModel.class).annotatedWith(Names.named("MemberTabModel")).to(MemberTabModel.class);
        bind(TabModel.class).annotatedWith(Names.named("StoresTabModel")).to(StoreTabModel.class);



//        install(new MemberModule());

        install(new BeerDialogModule());


//        install(new BeerKnurdServiceModule());


    }

//    @Provides
//    Credentials providesCredentials(UfoClubApp app) {
//        return app.getCredentials();
//    }


    @Provides
    @Named("memberId")
    Integer providesMemberId(@Named("autoPreferenceCredentials") ICredentials credentials) {
        return credentials.getMemberId();
    }

/*    @Provides
    @Named("originDate")
    String providesMemberId(UfoClubApp app) {
        return app.getCredentials().getOriginDate();
    }*/



}
